0
/*
 * @Author: your name
 * @Date: 2022-04-01 20:24:03
 * @LastEditTime: 2022-07-24 18:51:58
 * @LastEditors: YNT 2501512800@qq.com
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \22-03-19 智慧社区\api\expert.js
 */
import wxRequest from '../utils/wx-request'

class SpecialModel extends wxRequest {
  // 达人分类列表
  expertType() {
    return this.request({
      url: `/api/v1/talent/type`,
      method: 'GET',
    })
  }

  // 达人列表
  expertsList(id) {
    return this.request({
      url: `/api/v1/talent/user/list?talent_type_id=${id}`,
      method: 'GET',
    })
  }

  // 达人详情
  expertDetail(id) {
    return this.request({
      url: `/api/v1/talent/user?id=${id}`,
    })
  }

  // 达人点赞
  expertLike(id) {
    return this.request({
      url: `/api/v1/talent/user/like?talent_user_id=${id}`,
      method: 'GET',
    })
  }

  // 达人帖子
  expertShareList(id) {
    return this.request({
      url: `/api/v1/talent/news/list?talent_user_id=${id}`,
      method: 'GET',
    })
  }

  // 达人帖子详情
  expertShareDetail(id) {
    return this.request({
      url: `/api/v1/talent/news?talent_news_id=${id}`,
      method: 'GET',
    })
  }

  // 达人帖子评论
  expertShareDebate(data) {
    return this.request({
      url: `/api/v1/talent/news/comment`,
      method: 'POST',
      data,
    })
  }

  // 达人帖子点赞
  expertShareDebateLike(data) {
    return this.request({
      url: `/api/v1/talent/news/comment/like`,
      method: 'POST',
      data,
    })
  }

  // 达人帖子发布
  expertSharePublish(data) {
    return this.request({
      url: `/api/v1/talent/news`,
      method: 'POST',
      data,
    })
  }
}

export default new SpecialModel()
